<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<!doctype html>
<html lang="zh">
<head>
    <title>编辑数据字典</title>
    <%@include file="/common/header.jspf"%>


    <style>
        .formInput{
            width: 300px;
        }
    </style>
</head>

<body>
<div style="padding:10px 60px 20px 60px" >
    <form id="form" method="post">
        <input id="id" name="id" value="${dictionaryData.id}" hidden/>
        <table cellpadding="5">
            <tr >
                <td style="width: 100px;">上级字典:</td>
                <td>
                    <input id="pId" name="pId" value="${dictionaryData.pId}" hidden/>
                    <input value="${dictionaryData.pIdName}" class="easyui-textbox formInput" readonly/>
                </td>
            </tr>
            <c:if test="${dictionaryData.pId=='0'}">

                <tr>
                    <td>字典标识:</td>
                    <td><input class="easyui-textbox formInput"  name="code" value="${dictionaryData.code}" data-options="required:true,validType:'checkCode'" title="" readonly/></td>
                </tr>
                <tr style="display:none;color: red;width: 400%" id="code_err">
                    <td style="width: 100px;"></td>
                    <td>当前标识已存在！</td>
                </tr>

            </c:if>
            <tr>
                <td>字典名称:</td>
                <td><input class="easyui-textbox formInput"  name="name" value="${dictionaryData.name}" data-options="required:true" title=""/></td>
            </tr>
            <tr>
                <td>是否可编辑:</td>
                <td>
                    <select class="easyui-combobox" name="readonly" style="width:100%" data-options="required:true,editable:false,selectOnNavigation:true">
                        <option value="1" <c:if test="${dictionaryData.readonly==1}"> selected</c:if>  >是</option>
                        <option value="0" <c:if test="${dictionaryData.readonly==0}"> selected</c:if>  >否</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>排序号:</td>
                <td><input class="easyui-numberspinner formInput"  name="sort" value="${dictionaryData.sort}" value="0" title=""/></td>
            </tr>
            <tr>
                <td>备注:</td>
                <td><input class="easyui-textbox formInput" name="remarks" value="${dictionaryData.remarks}" data-options="multiline:true" style="height:60px" title=""/></td>
            </tr>

        </table>
    </form>
    <div style="text-align:center;padding:5px">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-save fa-lg" id="save" >保存</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-remove fa-lg" id="reset">清空</a>
    </div>
</div>
<script type="text/javascript" src="${ctx}/resources/js/permission/dictionaryData/edit.js"></script>
</body>
</html>
